<!--#include file="pjson.asp"-->
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>表管理</title>
<%
easp.include "h.asp"
session("tn")=val("tn")
easp.db.upd "ti0","regu1='yyyy/mm/dd'","regu1='<yyyy/mm/dd>'"
%>
</head>
<body>

  <div class="layui-fluid">
    <div class="layui-card"><br>
		<div class="layui-upload-drag" id="test10">
		<i class="layui-icon"></i>
		<p>点击上传，或将qes文件拖拽到此处</p>
	</div>
	<br>
      <div class="layui-form layui-card-header layuiadmin-card-header-auto">

        <div class="layui-form-item">
          <div class="layui-inline">
			<label class="layui-form-label">检索</label>
			<div class="layui-input-block">
				<input type="text" name="ti0" class="layui-input">
			</div>
          </div>

        <div class="layui-inline">
            <button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="ti0_search">
              <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
            </button>
			<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="ti0_add">新增</button>						 
		</div>
        </div>
	</div>
      <div class="layui-card-body">

	<script type="text/html" id="barDemo">
		<a class="layui-btn layui-btn-xs" lay-event="ti0_edit">修改</a>
		<a class="layui-btn layui-btn-xs" lay-event="ti0_del">删除</a>
	</script>
	
	<table id="ti0" lay-filter="ti0"></table><br>
	</div>
		</div>
  </div>
  <script src="../../../layuiadmin/layui/layui.js"></script>  
  <script>
  layui.config({
    base: '../../../layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'useradmin','upload','table'], function(){
    var $ = layui.$,form = layui.form,admin = layui.admin,upload = layui.upload,table=layui.table;
	table.render({
        elem: '#ti0',
        url: layui.setter.base + 'lib/reg.asp?action=ti0_list&dbName=<%=val("dbName")%>&tn=<%=val("tn")%>&now=' + new Date().getTime(),
        cols: [[
		{type:'checkbox'},		
        {
            field: 'id',
            title: 'ID',
            width: 60,
            sort: true,
			hide:false
        },
        {field: 'fld',title: '字段名',width: 100},		
        {field: 'colName',title: '列名',width: 100},		
        {field: 'mm1',title: '规则1',width: 100},		
        {field: 'regu1',title: '规则2',width: 100},		
        {field: 'dbName',title: '表名',width: 120},
        {field: 'tn',title: '项目名',width: 120},
        {
            fixed: 'right',
            width: 260,
            align: 'center',
            toolbar: '#barDemo'
        }]],
        id: 'ti0',
        limit: 10,
        page: true,
        height: 475
    });
  upload.render({
    elem: '#test10'
    ,url: location.protocol+'//'+location.host+'/dzps/up_t_content.asp?tn=<%=val("tn")%>&dbName=<%=val("dbName")%>&now=' + new Date().getTime()
    ,accept: 'file' //普通文件
    ,exts: 'zip|rar|7z|pdf|qes' //允许上传
    ,done: function(res){
      console.log(res);
	  layer.msg('上传成功！！'); 
    }
  });

<%
Easp.Echo myjs1("add1.js","tn|ti0,title|维护表结构")
Easp.Echo myjs1("edit1.js","tn|ti0,title|维护表结构")
%>
  });
  </script>
</body>
</html>